package com.h117121.fashionshop.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.h117121.fashionshop.core.dom.Account;

@Controller
@RequestMapping("/checkout")
public class CheckoutController {
	@RequestMapping(method = RequestMethod.GET)
	public String showPage(HttpServletRequest request) {
		Account account = (Account) request.getSession()
				.getAttribute("account");
		if (account == null) {
			return "redirect:/login";
		}
		return "CheckoutPage";
	}
}
